<?php
/**
 * Created by PhpStorm.
 * User: tt
 * Date: 2018/1/5
 * Time: 18:19
 */

namespace app\admin\controller;
use app\admin\logic\Daily as Daily_logic;
use think\Cache;
use think\Db;
use page\Page;

class Daily extends Admin
{
    /**
     * 行为列表
     * @return mixed
     */
    public function index(){
        $map=$this->request->param('map');
//        $data = self::$userClient->getAllUserInfo();
        $count =  Db::name('daily')->where($map)->count();
        $Page = new Page($count, 15);// 实例化分页类 传入总记录数和每页显示的记录数(25)
        $show = $Page->newshow();// 分页显示输出
        $daily =Db::name('daily')->where($map)->order('id desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
        $this->assign('daily',$daily);
        $this->assign('show',$show);
        return  $this->fetch();
    }
}